<?php

class CustomSendRegisterEmail extends DataExtension {
	function updateSendRegisterEmail(){
		if($package = OrderPackage::get()->filter('MemberID', $this->owner->ID)->filter('Status', array('Fully Paid'))->filter('Type', 'Register')->sort('PaidDate')->first()){
			if(!$this->owner->PackageTitle && !$this->owner->PackagePrice){
				$this->owner->PackageTitle = $package->Title;
				$this->owner->PackagePrice = $package->dbObject('Price')->Nice();
			}
		}
	}
}
?>